import axios from '@/libs/request/axios'
import {getUri} from "@/libs/tools";

export function list(query) {
    return axios.request({
        url: `/workflow/ruleAtom/list`,
        method: 'post',
        data: query
    });
}

export function addAtom(atom,path) {
    return axios.request({
        url: `/workflow/ruleAtom/addAfsRuleAtom`,
        method: 'post',
        data: atom
    });
}

export function modifyAtom(atom,path) {
    return axios.request({
        url: `/workflow/ruleAtom/modifyAfsRuleAtom`,
        method: 'post',
        data: atom
    });
}
export function deleteAtom(id,path) {
    return axios.request({
        url: `/workflow/ruleAtom/delAfsRuleAtom/${id}`,
        method: 'delete'
    });
}

export function queryAtomsByBizType(bizType,path='') {
    return axios.request({
        url: `/workflow/ruleAtom/queryAtomsByBizType/${bizType}`,
        method: 'post',
    });
}
